Page({
  data: {
    doctors: []
  },

  onLoad() {
    // 模拟数据，实际应该从服务器获取
    this.setData({
      doctors: [
        {
          id: 1,
          name: '张医生',
          avatar: '/assets/images/default-avatar.png',
          department: '内科',
          hospital: '协和医院',
          title: '主任医师'
        },
        {
          id: 2,
          name: '李医生',
          avatar: '/assets/images/default-avatar.png',
          department: '外科',
          hospital: '北京医院',
          title: '副主任医师'
        }
      ]
    })
  },

  // 查看医生详情
  viewDoctorDetail(e) {
    const { id } = e.currentTarget.dataset
    wx.navigateTo({
      url: `/pages/doctor/detail?id=${id}`
    })
  }
}) 